package com.rede.didiok.auth.feign;

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

import com.rede.didiok.common.utils.R;
import com.rede.didiok.auth.dto.UserDto;
import com.rede.didiok.auth.vo.SocialUser;
import com.rede.didiok.auth.vo.UserLoginVo;
import com.rede.didiok.auth.vo.UserRegistVo;

@FeignClient("didiok-user")
public interface UserFeignService {

    @PostMapping("/user/user/regist")
    R regist(@RequestBody UserRegistVo vo);

    @PostMapping("/user/user/login")
    R login(@RequestBody UserLoginVo vo);

    /**
     * 第三方登录接口
     * @param user
     * @return
     */
    @PostMapping("/user/user/oauth/login")
    R oauthLogin(@RequestBody UserDto user);

    @PostMapping("/user/user/oauth2/login")
    R oauthlogin(@RequestBody SocialUser socialUser) throws Exception;

}
